<%@ Page Language="C#" MasterPageFile="~/MasterPageMcSig.master" AutoEventWireup="true" CodeFile="EjecucionTerritorialList.aspx.cs"
    Inherits="EjecucionTerritorialList" %>
<%@ Register TagPrefix="cc1" Namespace="UsrControls" Assembly="UsrControls" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3.Export, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>    
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>

<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 
    <script language="javascript" type="text/javascript">
    
    function irdepto(strDepto)
	{
		var idDepto = strDepto.substring(1);
		selectValue(document.getElementById('ctl00_ContentPlaceHolder1_ddldepartamentosAnthem'), idDepto);
	  Anthem_InvokePageMethod(
            'cargarDepartamentosMunicipios',
            [idDepto],
            function(result) {}
        );
	}
	
        
function selectValue(combo, value)
 {

	if (combo!=null)
	{
		for (opcombo=0;opcombo<combo.length;opcombo++)
		{			
			var valor=combo.options[opcombo].value;
			if (valor == value)
			{
			
				combo.selectedIndex = opcombo;
				break;
			}
		}
	}
}
    
   function seleccionaDeptoA(controlName) 
{

	var control = document.getElementById(controlName);

	if (control==null)
	{
		return;
	}
		
  var movieName = "colombia";
  var valor = control.options[control.selectedIndex].value;
  
	if (valor.length >= 2)
  {
		var Frame = valor.substring(0,2);
  }
  else
  {
		return;
  }
  
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  var  thisMovie;
	
  if (navigator.appName.indexOf ("Microsoft") !=-1) 
  {
    thisMovie =  document.aspnetForm[movieName];
  }	
  else 
  {
    thisMovie = document.aspnetForm[movieName];
  }
  
  // Si encontro la pelicula
  if (typeof(thisMovie) != "undefined")
  {
	// Si esta totalmente cargado
    if (thisMovie.PercentLoaded() == 100)
    {
			thisMovie.GotoFrame(Frame);
		}
  }
}
    </script>



        <div>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td  style="height: 20px">
                    </td>
                </tr>
                <tr>
                    <td colspan="">
                        &nbsp;<table border="1" cellpadding="1" cellspacing="1" width="30%">
                            <tr>
                                <td style="vertical-align: top; width: 220px; height: 136px; text-align: left">
                                    <table width="100%">
                                        <tr>
                                            <td>
                                                Departamento
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <anthem:DropDownList ID="ddldepartamentosAnthem" runat="server" AutoCallBack="True"
                                                    AutoUpdateAfterCallBack="True" OnSelectedIndexChanged="ddldepartamentosAnthem_SelectedIndexChanged"
                                                    Width="200px">
                                                </anthem:DropDownList></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                Municipio</td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <anthem:DropDownList ID="ddlMunicipiosAnthem" runat="server" AutoCallBack="True"
                                                    OnSelectedIndexChanged="ddlMunicipiosAnthem_SelectedIndexChanged" Width="200px">
                                                </anthem:DropDownList></td>
                                        </tr>
                                    </table>
                                </td>
                                <td style="height: 136px">
                                    <anthem:Panel ID="pnlMapa" runat="server" AutoUpdateAfterCallBack="true">
                                        <cc1:Mapas ID="Mapas2" runat="server" EnableViewState="False" HeightPais="220" TipoMapa="Pais"
                                            WidthPais="185">
                                        </cc1:Mapas>
                                    </anthem:Panel>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr style="height: 21px">
                                <td class="est-tablagris" style="width: 2%">
                                </td>
                                <td class="est-tablagris" >
                                </td>
                                <td rowspan="1" style="width: 3px; height: 2%" class="est-tablagris">
                                </td>
                            </tr>
                            <tr>
                                <td class="est-tablagris" style="width: 1%">
                                </td>
                                <td>
                                    <anthem:Panel ID="pnlGridPlanAccion" runat="server" Height="100%" Width="100%" AutoUpdateAfterCallBack="True">
                                        <dxwgv:ASPxGridView ID="gidvSigEjeAccionesZonaGeografica" runat="server" AutoGenerateColumns="False"
                                            CssFilePath="~/App_Themes/Office2003 Blue/{0}/styles.css" CssPostfix="Office2003_Blue"
                                            KeyFieldName="ACC_ID" Width="100%">
                                            <SettingsText Title="Ejecuci&#243;n Territorial" />
                                            <SettingsPager NumericButtonCount="5">
                                                <AllButton Visible="True">
                                                </AllButton>
                                            </SettingsPager>
                                            <Images ImageFolder="~/App_Themes/Office2003 Blue/{0}/">
                                                <ExpandedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                                <CollapsedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <DetailCollapsedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvCollapsedButton.png"
                                                    Width="11px" />
                                                <DetailExpandedButton Height="12px" Url="~/App_Themes/Office2003 Blue/GridView/gvExpandedButton.png"
                                                    Width="11px" />
                                            </Images>
                                            <Settings ShowFilterRow="True" ShowFooter="True" ShowGroupFooter="VisibleIfExpanded"
                                                ShowGroupPanel="True" />
                                            <Styles CssFilePath="~/App_Themes/Office2003 Blue/{0}/styles.css" CssPostfix="Office2003_Blue">
                                                <LoadingPanel ImageSpacing="10px">
                                                </LoadingPanel>
                                                <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                                </Header>
                                            </Styles>
                                            <Columns>
                                                <dxwgv:GridViewDataTextColumn Caption="Departamento" FieldName="ZON_NOMBRE_PADRE"
                                                    Visible="False" VisibleIndex="0">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn Caption="Municipio" FieldName="ZON_NOMBRE" VisibleIndex="0">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn Caption="Acciones" FieldName="ACC_DESCRIPCION" VisibleIndex="1"
                                                    Width="200px">
                                                    <HeaderStyle Wrap="True" />
                                                    <CellStyle Wrap="True">
                                                    </CellStyle>
                                                    <FooterCellStyle Wrap="True">
                                                    </FooterCellStyle>
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn FieldName="EAZ_ESPECIFICA" Visible="False" VisibleIndex="2">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn FieldName="EAZ_OTRAS" Visible="False" VisibleIndex="2">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn Caption="Rubro" FieldName="PLN_NOMBRE" VisibleIndex="2">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn Caption="Dependencia" FieldName="DEP_NOMBRE" VisibleIndex="3">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn Caption="Ejecutado" FieldName="EJECUTADO" GroupIndex="0"
                                                    SortIndex="0" SortOrder="Ascending" VisibleIndex="4">
                                                </dxwgv:GridViewDataTextColumn>
                                                <dxwgv:GridViewDataTextColumn Caption="Total" FieldName="TOTAL" VisibleIndex="5">
                                                </dxwgv:GridViewDataTextColumn>
                                            </Columns>
                                            <TotalSummary>
                                                <dxwgv:ASPxSummaryItem FieldName="TOTAL" ShowInGroupFooterColumn="Total" SummaryType="Sum" />
                                            </TotalSummary>
                                            <GroupSummary>
                                                <dxwgv:ASPxSummaryItem FieldName="TOTAL" ShowInGroupFooterColumn="Total" SummaryType="Sum" />
                                            </GroupSummary>
                                        </dxwgv:ASPxGridView>
                                    </anthem:Panel>
                                </td>
                                <td class="est-tablagris" style="width: 3px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 1%; height: 1%" class="est-tablagris">
                                </td>
                                <td class="est-tablagris" style="height: 1%">
                                </td>
                                <td style="height: 1%; width: 3px;" class="est-tablagris">
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    
</asp:Content>